package org.minbox.chapter.seata.service;

import com.cloud.model.order.Order;
import org.minbox.chapter.seata.mapper.OrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author 恒宇少年
 */
@Service
@Transactional(rollbackFor = Exception.class)

public class OrderService {
    @Autowired
    private OrderMapper orderMapper;

   public  boolean crateOrder(Order order){
       boolean save = orderMapper.save(order);
       return  save;
   }

}
